home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 10 - 1994 / 10.09 Sep 94 / Fez (MacHack Winner) / FezEdit ƒ / Main.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-20  |  2.1 KB  |  107 lines  |  [TEXT/MMCC]

  1. /*
  2.  *    Main.h
  3.  *
  4.  *    General interface definitions for the main application
  5.  */
  6.  
  7. /* Useful macros */
  8.  
  9. #define NIL ((void *)0)
  10. #define MAXWINDOWS 16
  11. #define WIDGETHEIGHT    64
  12. #define WIDGETWIDTH        64
  13. #define SCROLLBARWIDTH    16
  14. #define TITLEBARHEIGHT    21
  15.  
  16. /* Useful types and IDs */
  17.  
  18. #define fezHatColorIconID    128
  19. #define fezHatSelectedID    129
  20.  
  21. #define aboutBoxAlertID        129
  22. #define BWaboutBoxAlertID    130
  23.  
  24. #define appleMenuID    128
  25. enum {
  26.         AM_About = 1
  27.     };
  28.  
  29. #define fileMenuID    129
  30. enum {
  31.         FM_New = 1,
  32.         FM_Open,
  33.         FM_Close,
  34.         FM_CloseAll,
  35.         FM_______5,
  36.         FM_Quit
  37.     };
  38.  
  39. #define editMenuID    132
  40. enum {
  41.         EM_Undo = 1,
  42.         EM_____2,
  43.         EM_Cut,
  44.         EM_Copy,
  45.         EM_Clear,
  46.         EM_Paste,
  47.         EM_____7,
  48.         EM_SelectAll,
  49.         EM_SendBehind
  50.     };
  51.  
  52. #define demoMenuID 130
  53. enum {
  54.         DM_SaveDemo = 1,
  55.         DM____2,
  56.         DM_None
  57.     };
  58.  
  59. #define optionsMenuID 131
  60. enum {
  61.         OM_SetLine = 1,
  62.         OM_SetSpeed,
  63.         OM_SetQueue,
  64.         OM________4,
  65.         OM_NoZooms,
  66.         OM_StandardZooms,
  67.         OM_OneWindowDive,
  68.         OM_FrameEvading
  69.     };
  70.  
  71. #define windowMenuID    133
  72. #define openWindowMenuID 134
  73. #define closeWindowMenuID 135
  74.  
  75. // items created dynamically
  76.  
  77. typedef struct {
  78.  
  79.     Rect        position;                    // Local window coords of openable widget
  80.     WindowPtr    openWindow;                    // The window it got opened into
  81.     WindowPtr    itsWindow;                    // The window it is within
  82.     short        isSelected;                    // Needs selection highlight
  83.     
  84.     } Widget, *WidgetPtr, **WidgetHandle;
  85.  
  86.  
  87. // Structure of each entry in the 'DEMO' setup resource.  The i'th entry corresponds
  88. // to the i'th Fez window to open at a given position.  The order field says what
  89. // order to select the windows after their opened so that we can create and store a
  90. // window list ordering different from the order they were opened in.
  91.  
  92. typedef struct {
  93.     Rect    position;                // Window position in global coordinates
  94.     Rect    fezBounds;                // Where to place Fez in window
  95.     short    finalOrdering;            // Index of window in final window list
  96.     short    closeOrdering;            // Index of window to close (or -1)
  97.     
  98.     } StartWindow;
  99.  
  100. typedef struct {
  101.     short numWins;
  102.     StartWindow win[1];
  103.     } **StartWindowHandle;
  104.  
  105. // Prototypes
  106. short GetLineThickOrSpeed(short oldVal, int doSpeed);
  107.